package testing;

import org.junit.Test;

import ui.Reporter;
import web.PageParser;

/**
 * This is a test class to ensure page is parsed properly.
 * 
 * @author Krisnil Gounder
 * @version April 12th, 2011
 *
 */
public class PageParserUnitTest {
	
	private PageParser parser;
	
	@Test
	public void testPageParser() {

		String testPage = "testPage <html> <body> <h1>My First Heading</h1> <p> My first paragraph.</p> </body> </html> " +
				"<html> <body> <!--This comment will not be displayed--> <p>" +
				"This is a regular paragraph</p> </body> </html>" +
				"<html> <body> <a href= http://www.w3schools.com> This is a link</a> </body> </html>";
		
		
		String testURL = "http://download.oracle.com/javase/1.5.0/docs/api/java/util/regex/Matcher.html";
			
		parser = new PageParser(testURL, null, testPage);  
		
		System.out.println("After Parsing - ");
		parser.testOutput();
		
	}

}
